//
//  DHUserInfoModel.m
//  DHKuaiYi
//
//  Created by xiaohuihui on 2016/11/14.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import "DHUserInfoModel.h"

#define userInfoContentKey @"userInfoContentKey"

@implementation DHUserInfoModel

/**
 归档
 */
- (void)encodeWithCoder:(NSCoder *)aCoder {
    //将用户输入的信息进行归档操作
    [aCoder encodeObject:_userInfoContent forKey:userInfoContentKey];
}

/**
 解档
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    /*---------- 1.实例化对象 ----------*/
    self = [super init];
    if (self) {
        /*---------- 2.将归档的属性还原出来 ----------*/
        _userInfoContent = [aDecoder decodeObjectForKey:userInfoContentKey];
    }
    return self;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"%@--%@",self.title,self.userInfoContent];
}

@end
